#include "Match.hpp"

using namespace std;



RegularExpressions::Match::Match(int nbGroups)
 : _groups(nbGroups, Group())
{
	
}



bool RegularExpressions::Match::success() const
{
	return (_groups.size() != 0);
}



int RegularExpressions::Match::countGroups() const
{
	return _groups.size();
}



const RegularExpressions::Group& RegularExpressions::Match::group(int id) const throw(out_of_range)
{
	return _groups.at(id);
}



const vector<RegularExpressions::Group>& RegularExpressions::Match::groups() const
{
	return _groups;
}



